package com.example.javadesign.adapter.demo.power.interfaceadapter;

import com.example.javadesign.adapter.general.interfaceadapter.Adaptee;
import com.example.javadesign.adapter.general.interfaceadapter.Adapter;
import com.example.javadesign.adapter.general.interfaceadapter.Target;

/**
 * @author 陳樂
 * @version 1.0.0
 * @ClassName Main.java
 * @Description TODO
 * @createTime 2022年09月05日 23:08:00
 */
public class Main {

    public static void main(String[] args) {
        Dc adapter = new PowerAdapter(new Ac220()) {
            @Override
            public int outputV5() {
                int a = new Ac220().outPut220V();
                return a/5;
            }
        };

        int result = adapter.outputV5();
        System.out.println(result);
    }
}
